package com.cqcomponents.components;

import com.cqcomponents.annotations.ComponentInjection;

public class Teaser extends BaseComponent {

	private Headline headline;
	private Button button;
	private Text text;

	@ComponentInjection(mandatory = true)
	public void setHeadline(Headline headline) {
		this.headline = headline;
	}

	@ComponentInjection
	public void setButton(Button button) {
		this.button = button;
	}

	@ComponentInjection
	public void setText(Text text) {
		this.text = text;
	}

	@Override
	public String toString() {
		return "Teaser={headline:" + this.headline + ", text:" + this.text
				+ ", button:" + this.button + "}";
	}

	@Override
	public boolean getHasContent() {
		return true;
		// TODO: Proper evaluation
		/*
		 * return this.text != null && this.text.getHasContent() &&
		 * this.headline != null && this.headline.getHasContent() && this.button
		 * != null && this.button.getHasContent();
		 */
	}

}
